package io.renren.common.exception;

public enum ExceptionCode {

    UNKNOWN(-1,"未知错误"),
    TOKEN_PASS( 1001, "token过期" ),
    NO_LOGIN( 1002, "未登录" ),
    NO_PHONE( 1003, "未绑定手机" ),
    NO_MSG( 1004, "验证码错误" ),
    NO_TOKEN( 1005, "凭证不能为空" ),
    TOKEN_DEL( 1006, "无效凭证" ),
    USERNAME_EXIST( 1007, "用户名已存在" ),

    NO_BUY( 2001, "未购买" ),
    HAS_BUY( 2002, "已购买" ),
    NO_MONEY( 2003, "余额不足" ),
    FREE_ALBUM( 2004, "免费专辑" ),

    NO_VERSION( 3001, "未知app版本" ),
    NO_OSS_CONFIG( 3002, "未配置oss" ),
    ;

    ExceptionCode(int code, String msg ){
        this.code = code;
        this.msg = msg;
    }

    private String msg;
    private int code = 500;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
